<template>
  <div class="detection-set">
    <el-row :gutter='24' class='form' id='formt' style='background:#fff; position: relative;'>
      <el-col :span='7'>
        <div class='grid-content'>
          <el-form  :model='searchForm' label-width='70px' @submit.native.prevent>
            <el-form-item label='水压阈值' class='img-name'>
              <el-select v-model="searchForm.pressure" placeholder="请选择水压阈值" style="width: 200px;">
                <el-option :label="item.name" :value="item.id" v-for="(item, index) in pressureEnum" :key="index"></el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </div>
      </el-col>
      <el-col :span='7'>
        <div class='grid-content'>
          <el-form  :model='searchForm' label-width='70px' @submit.native.prevent>
            <el-form-item label='上报时间' class='img-name'>
              <el-select v-model="searchForm.reportTime" placeholder="请选择上报时间" style="width: 200px;">
                <el-option :label="item.name" :value="item.id" v-for="(item, index) in reportTimeEnum" :key="index"></el-option>
              </el-select>
            </el-form-item>
          </el-form>
        </div>
      </el-col>
      <el-col :span='10' class='btn-cx'>
        <div class='grid-content '>
          <el-form :model='searchForm' label-width='100px' @submit.native.prevent style="float: right">
            <el-button type='primary' @click="handleEdit" class="search-btn" v-has-permission="btn[0]">编辑</el-button>
          </el-form>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    name: 'DetectionSet',
    props: {
      btn: {
        type: Array
      }
    },
    data () {
      return {
        pressureEnum: [
          {
            name: '30',
            id: 0
          }
        ],
        reportTimeEnum: [
          {
            name: '3分钟',
            id: 0
          }
        ],
        // 查询
        searchForm: {
          pressure: 0,
          reportTime: 0
        }
      }
    },
    methods: {
      handleEdit () {

      }
    }
  }
</script>

<style lang="scss" scoped>
  @import "../../../../../static/scss/common";
  .detection-set {
    .el-input.is-disabled .el-input__inner {
      color: #606266;
      border: 0;
      background-color: #fff;
    }
    .el-row {
      padding: 0;
      .el-col {
        padding: 0 !important;
      }
    }
    .el-form {
      height: 28px;
      display: flex;
      align-items: center;
    }
    .el-form-item.img-name {
      font-family: "微软雅黑";
      font-size: 12px !important;
      font-weight: bold;
      color: #444;
      position: relative;
    }
    .el-form-item__label {
      font-size: 12px !important;
      padding: 0;
      text-align: left;
      text-indent: 51px;
    }
    .img-name /deep/ .el-form-item__label:before {
      position: absolute;
      display: block;
      left: 0px;
      top: 17px;
      content: " ";
      width: 15px;
      height: 20px;
      background: url("../../../../../static/image/common/left.png") no-repeat;
    }
    .img-name /deep/ .el-form-item__label:after {
      position: absolute;
      display: block;
      left: 80px;
      top: 17px;
      content: " ";
      width: 20px;
      height: 20px;
      background: url("../../../../../static/image/common/right.png") no-repeat;
    }
    .date-picker /deep/ .el-input--prefix .el-input__inner {
      padding-left: 30px;
    }
    .el-form-item.img-name {
      margin: 10px 0 10px 0;
    }
    .form .el-input__inner {
      height: 28px !important;
      line-height: 28px !important;
      border: 1px solid #e4e4e4;
      padding: 0 0 0 10px!important;
      .el-icon-time{
        line-height: 0;
      }
      .el-range-separator{
        line-height: 25px;
      }
    }
    .form.el-row {
      margin-bottom: 20px;
      &:last-child {
        margin-bottom: 0;
      }
    }
  }
</style>
